import 'package:lz_login/src/serve/models/kd_mine_certification_info_model.dart';

class KDInfoDetailModel {
  bool showGoCertificate = true;
  // 法人证件号码
  String? certificateNumber;
  // 实名认证状态，01：通过，02：异常通过，03：不通过
  String? certificationStatus;
  // 实名认证状态，01：通过，02：异常通过，03：不通过
  String? certificationStatusStr;
  // 公司法人姓名
  String? companyLegaName;
  // 所属公司名称
  String? companyName;
  // 所属公司编码
  String? companyNo;
  // 创建时间
  String? createTime;
  // 创建人姓名
  String? createUserName;
  // 创建人
  String? createUserNo;
  // 创建人手机号码
  String? createUserPhone;
  String? memberId;
  String? mainOrgId;

  // 是否生成电子签章，01：未生成，02：生成中，03：已生成，04：生成失败
  String? isElectSign;
  // 是否开启额度限制，1：是，0：否
  String? isIncomeLimit;
  // 是否开通钱包，1：是，0：否
  String? isOpenWallet;
  // 是否通过二维码邀请注册
  String? isQrCodeInvitationRegister;
  // 是否发送短信，1：是，0：否
  String? isSendSms;
  // 是否签署注册协议，1：是，0：否
  String? isSignedRegisterAgreement;
  // 主机构名称
  String? mainOrgName;
  // 主机构编码
  String? mainOrgNo;
  // 证件号码，身份证/社会信用代码
  String? memberCertificationNumber;
  // 会员ID
  String? memberCode;

  // 会员等级，00：V0，01：V1，02：V2，03：V3，04：V4，05：V5
  String? memberLevel;
  // 会员登录密码
  String? memberPassword;
  // 登陆手机号码
  String? memberPhone;
  // 手机号码3
  String? memberPhoneThree;
  // 手机号码2
  String? memberPhoneTwo;
  // 会员类型，01：企业，02：个人
  String? memberType;
  // 会员类型，01：企业，02：个人
  String? memberTypeStr;
  // 所属机构名称
  String? orgName;
  // 所属机构编码
  String? orgNo;
  // 修改时间
  String? updateTime;
  // 修改人姓名
  String? updateUserName;
  // 修改人
  String? updateUserNo;
  // 用户ID
  String? userCode;

  // 姓名/公司名
  String? userName;

  List<KDMineCertificationInfoModel>? memberAuthInfoVOList;

  KDInfoDetailModel(
      {this.certificateNumber,
      this.certificationStatus,
      this.certificationStatusStr,
      this.companyLegaName,
      this.companyName,
      this.companyNo,
      this.createTime,
      this.createUserName,
      this.createUserNo,
      this.createUserPhone,
      this.isElectSign,
      this.isIncomeLimit,
      this.isOpenWallet,
      this.isQrCodeInvitationRegister,
      this.isSendSms,
      this.isSignedRegisterAgreement,
      this.mainOrgName,
      this.mainOrgNo,
      this.memberCertificationNumber,
      this.memberCode,
      this.memberLevel,
      this.memberPassword,
      this.memberPhone,
      this.memberPhoneThree,
      this.memberPhoneTwo,
      this.memberType,
      this.memberTypeStr,
      this.orgName,
      this.orgNo,
      this.updateTime,
      this.updateUserName,
      this.updateUserNo,
      this.userCode,
      this.userName,
      this.memberId,
      this.mainOrgId,
      this.memberAuthInfoVOList});

  factory KDInfoDetailModel.fromJson(Map<String, dynamic> json) {
    List<KDMineCertificationInfoModel>? list;
    var jsonMemberAuthInfoVOList = json["memberAuthInfoVOList"];
    if (jsonMemberAuthInfoVOList != null &&
        jsonMemberAuthInfoVOList is List<dynamic>) {
      list = jsonMemberAuthInfoVOList
          .map((e) => KDMineCertificationInfoModel.fromJson(e))
          .cast<KDMineCertificationInfoModel>()
          .toList();
    }
    return KDInfoDetailModel(
      certificateNumber: json["certificateNumber"],
      certificationStatus: json["certificationStatus"],
      certificationStatusStr: json["certificationStatusStr"],
      companyLegaName: json["companyLegaName"],
      companyName: json["companyName"],
      companyNo: json["companyNo"],
      createTime: json["createTime"],
      createUserName: json["createUserName"],
      createUserNo: json["createUserNo"],
      createUserPhone: json["createUserPhone"],
      isElectSign: json["isElectSign"],
      isIncomeLimit: json["isIncomeLimit"],
      isOpenWallet: json["isOpenWallet"],
      isQrCodeInvitationRegister: json["isQrCodeInvitationRegister"],
      isSendSms: json["isSendSms"],
      isSignedRegisterAgreement: json["isSignedRegisterAgreement"],
      mainOrgName: json["mainOrgName"],
      mainOrgNo: json["mainOrgNo"],
      memberCertificationNumber: json["memberCertificationNumber"],
      memberCode: json["memberCode"],
      memberLevel: json["memberLevel"],
      memberPassword: json["memberPassword"],
      memberPhone: json["memberPhone"],
      memberPhoneThree: json["memberPhoneThree"],
      memberPhoneTwo: json["memberPhoneTwo"],
      memberType: json["memberType"],
      memberTypeStr: json["memberTypeStr"],
      orgName: json["orgName"],
      orgNo: json["orgNo"],
      updateTime: json["updateTime"],
      updateUserName: json["updateUserName"],
      updateUserNo: json["updateUserNo"],
      userCode: json["userCode"],
      userName: json["userName"],
      memberId: json["memberId"],
      mainOrgId: json['mainOrgId'],
      memberAuthInfoVOList: list,
    );
  }

  Map<String, dynamic> toJson() => {
        "certificateNumber": certificateNumber,
        "certificationStatus": certificationStatus,
        "certificationStatusStr": certificationStatusStr,
        "companyLegaName": companyLegaName,
        "companyName": companyName,
        "companyNo": companyNo,
        "createTime": createTime,
        "createUserName": createUserName,
        "createUserNo": createUserNo,
        "createUserPhone": createUserPhone,
        "isElectSign": isElectSign,
        "isIncomeLimit": isIncomeLimit,
        "isOpenWallet": isOpenWallet,
        "isQrCodeInvitationRegister": isQrCodeInvitationRegister,
        "isSendSms": isSendSms,
        "isSignedRegisterAgreement": isSignedRegisterAgreement,
        "mainOrgName": mainOrgName,
        "mainOrgNo": mainOrgNo,
        "memberCertificationNumber": memberCertificationNumber,
        "memberCode": memberCode,
        "memberLevel": memberLevel,
        "memberPassword": memberPassword,
        "memberPhone": memberPhone,
        "memberPhoneThree": memberPhoneThree,
        "memberPhoneTwo": memberPhoneTwo,
        "memberType": memberType,
        "memberTypeStr": memberTypeStr,
        "orgName": orgName,
        "orgNo": orgNo,
        "updateTime": updateTime,
        "updateUserName": updateUserName,
        "updateUserNo": updateUserNo,
        "userCode": userCode,
        "userName": userName,
        "memberId": memberId,
        'mainOrgId': mainOrgId,
      };
}
